#Cmake最小版本
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

SET(PROJECT_NAME 2023_evolution_visual_group_train)
project(${PROJECT_NAME})
SET(CMAKE_BUILD_TYPE RELEASE)
#SET(CMAKE_BUILD_TYPE DEBUG)
SET(CMAKE_CXX_STANDARD 11)

#可执行文件生成路径
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/build)

#找到OpenCV包
set(OpenCV_DIR D:/OpenCV4/opencv/mingw_build/install)
FIND_PACKAGE(OpenCV REQUIRED)

#引用库
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})

#生成指定目标
add_executable(${PROJECT_NAME}
        main.cpp
        part3-3.cpp
        part4.cpp
        part7-2.cpp
        part2-1.cpp
        part2-2.cpp
        part2-0.cpp part6.cpp)

#将第三方的库链接到可执行文件
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
